import { CALL_API } from "../middleware/api";

export const fetchHome = () => (dispatch, getState) => {
  dispatch({
    [CALL_API]: {
      types: ["FETCH_HOME_REQUEST", "FETCH_HOME_SUCCESS", "FETCH_HOME_FAIL"],
      endpoint: `/v1/home/wechant/main`,
      // body: opt,
      method: "POST"
    }
  });
};
export const homeFlag = () => (dispatch, getState) => {
  return dispatch({
    type: "HOME_FLAG",
    flag: false
  });
};
